<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>骰子</title>
    <style>
        *{
            padding:0;
            margin:0;
        }
        .container{
            position: relative;
            width: 100px;
            height: 100px;
            top:200px;
            left: 400px;
        }
        .contain{
            transform-style:preserve-3d;
            position: relative;
            width: 100px;
            height: 100px;
            animation:scroll 5s linear 1s infinite;
        }
        @keyframes scroll{
            100%{
                transform:rotate3d(1,1,1,360deg);
            }
        }
        .view{
            position: absolute;
            height: 100px;
            width: 100px;
            border-radius: 20%;
            opacity: 0.8;
        }
        .point{
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background-color: yellow;
        }
        .view1{
            z-index: 6;
            display: flex;
            display: -webkit-flex;
            justify-content:center;
            align-items:center;
            transform:translateZ(100px);
            background-color:#0aa770;
        }
        .view2{
            z-index: 5;
            display: flex;
            flex-direction:column;
            justify-content:space-around;
            align-items:center;
            transform:rotateY(-90deg);
            transform-origin:left;
            background-color: #0000FF;
        }
        .view3{
            z-index: 3;
            transform-origin:top;
            display: flex;
            justify-content:space-around;
            transform:rotateX(90deg);
            transform-origin:top;
            background-color: #8c0bef;
        }
        .view3 .point:nth-child(2){
            align-self:center;
        }
        .view3 .point:nth-child(3){
            align-self:flex-end;
        }
        .view4{
            z-index: 2;
            transform-origin:bottom;
            display: flex;
            justify-content:space-around;
            flex-wrap:wrap;
            transform:rotateX(-90deg);
            transform-origin:bottom;
            background-color: #00A000;
        }
        .view4 .column{
            display: flex;
            flex-basis:100%;
            justify-content:space-around;
            align-items:center;
        }
        .view5{
            z-index: 4;
            display: flex;
            justify-content:space-around;
            flex-wrap:wrap;
            transform:rotateY(90deg);
            transform-origin:right;
            background-color: #FF0000;
        }
        .view5 .column{
            display: flex;
            flex-basis:100%;
            justify-content:space-around;
            align-items:center;
        }
        .view6{
            display: flex;
            justify-content:space-around;
            flex-wrap:wrap;
            z-index: 1;
            background-color: #880000;
        }
        .view6 .column{
            display: flex;
            flex-basis:100%;
            justify-content:space-around;
            align-items:center;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="contain">
        <div class="view view1">
            <div class="point"></div>
        </div>
        <div class="view view2">
            <div class="point"></div>
            <div class="point"></div>
        </div>
        <div class="view view3">
            <div class="point"></div>
            <div class="point"></div>
            <div class="point"></div>
        </div>
        <div class="view view4">
            <div class="column">
                <div class="point"></div>
                <div class="point"></div>
            </div>
            <div class="column">
                <div class="point"></div>
                <div class="point"></div>
            </div>
        </div>
        <div class="view view5">
            <div class="column">
                <div class="point"></div>
                <div class="point"></div>
            </div>
            <div class="column">
                <div class="point"></div>
            </div>
            <div class="column">
                <div class="point"></div>
                <div class="point"></div>
            </div>
        </div>
        <div class="view view6">
            <div class="column">
                <div class="point"></div>
                <div class="point"></div>
            </div>
            <div class="column">
                <div class="point"></div>
                <div class="point"></div>
            </div>
            <div class="column">
                <div class="point"></div>
                <div class="point"></div>
            </div>
        </div>
    </div>
</div>
</body>
</html>